home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vdtj122b.zip / DEMO12.TXT < prev    next >
Text File  |  1992-10-25  |  6KB  |  297 lines

  1. As you enter Command Mode commands,
  2. you will be able to see their effect
  3. in the upper left window.
  4.  
  5. There are several commands for moving
  6. the cursor:
  7.  
  8. Z    Move to end of file
  9. B    Move to begin of file
  10.  
  11. L    Move down one line
  12. 10L    Move down 10 lines
  13. -L    Move up one line
  14. -5L    Move up five lines
  15.  
  16. C    Move right one character
  17. -C    Move left one character
  18. -20C    Move left 20 characters
  19.  
  20. Type each of these commands.  Remember
  21. to press <Enter> after each command.
  22.  
  23. -- Give command "MN" to continue --
  24.  
  25. 
  26. Two commands delete text:
  27.  
  28. D    Delete current character
  29. 5D    Delete next 5 characters
  30.  
  31. K    Delete to end of current line
  32. -2K    Delete the previous two lines
  33.  
  34. Several commands insert text:
  35.  
  36. I/text/    Insert the following 'text'
  37. nEI    Insert character with value 'n'
  38.  
  39. For example, give the command:
  40.  
  41. I/Insert this text. /
  42.  
  43. To insert the graphics character with
  44. value "205" give the command:
  45.  
  46. 205 EI       (the space is optional)
  47.  
  48. -- Give command "MN" to continue --
  49.  
  50. 
  51. The real power of Command Mode comes
  52. from the ability to combine commands.
  53.  
  54. For example, the commands to insert a
  55. new line at the end of the file are:
  56. (Note: Press the "<Enter>" key twice .)
  57.  
  58. Z I/This is the last line <Enter>
  59. / <Enter>
  60.  
  61.  
  62. The commands to delete the first line in
  63. the file are:
  64.  
  65. B K
  66.  
  67.  
  68. -- Give command "MN" to continue --
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. 
  76. The "F" (Find) command searches for
  77. text.  For example, to find the next
  78. occurrence of "the" give the commands:
  79.  
  80. F/the/
  81.  
  82. The command to search for the 4th
  83. occurrence of "the" is:
  84.  
  85. 4F/the/
  86.  
  87. (Try this: press <Cursor Up> to get the
  88. previous command "F/the/", press <Home>,
  89. type "4" and press <Enter>.)
  90.  
  91. The commands to search from the
  92. beginning of the file for the word "the"
  93. occurring at the beginning of a line is:
  94.  
  95. B F/|<the/
  96.  
  97. -- Give command "MN" to continue --
  98.  
  99.  
  100.  
  101.  
  102.  
  103. 
  104. You can use the Command Mode as a simple
  105. integer calculator by just typing in the
  106. algebraic expression you want
  107. calculated.  For examples, enter:
  108.  
  109. 12 + (169 / 13)    (and <Enter>)
  110.  
  111. 24 * 92 - 16
  112.  
  113. You can also calculate the ASCII values
  114. of characters and control characters.
  115. For example, enter:
  116.  
  117. "A
  118.  
  119. Its value is 65 because the letter "A"
  120. is the 65th character in the ASCII
  121. table.  For the value of <CTRL-S> enter:
  122.  
  123. ^S    (Type "^", then type "S".)
  124.  
  125. Its value is 19.
  126. -- Give command "MN" to continue --
  127.  
  128. 
  129. The following "macro" will display the
  130. line numbers of those lines in our file
  131. which contain the phrase "VEDIT PLUS".
  132. Type it in carefully.  Note that you
  133. must press the <ESC> key.
  134.  
  135. B [ F/VEDIT PLUS/ .LN <ESC> ]
  136.  
  137. Here is how it works:
  138.  
  139. The "B" moves to the beginning of the
  140. file.   The "[" and "]" specify a loop
  141. which is to be repeated.  The
  142. "F/VEDIT PLUS/" searches for the phrase.
  143. The ".LN <ESC>" displays the current
  144. line number.  The macro loops until
  145. done.
  146.  
  147. Congratulations.  You have now written
  148. a computer program using VEDIT PLUS!
  149.  
  150. -- Give command "MN" to continue --
  151.  
  152.  
  153. 
  154. Here is a macro which counts the number
  155. of words in the file and displays the
  156. result:
  157.  
  158. 0XS(1)
  159. B [ F/|S|A/ XA(1)]
  160. YT/Number of words =/ XT(1)
  161.  
  162. Try it.
  163.  
  164. "0XS(1)" initializes a counter to zero.
  165. "F/|S|A/ searches for the next word.
  166. "XA(1)" increments the counter each
  167. time a word is found.  The "YT" command
  168. displays the following text and "XT(1)"
  169. displays the contents of the counter.
  170.  
  171. -- Give command "MN" to continue --
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. 
  179. VEDIT PLUS has many internal counters
  180. which simplify writing useful macros.
  181. For example, the following macro is an
  182. easier way of counting the words in a
  183. file.  Try it.
  184.  
  185. B #F/|S|A/
  186. YT/Number of words = / .RV
  187.  
  188.  
  189. "#F/|S|A/" searches for all occurrences
  190. of a new word.  ".RV" displays how many
  191. times the search succeeded, i.e. how
  192. many words there are in the file.
  193.  
  194. -- Give command "MN" to continue --
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203. 
  204. "YI" is a very powerful command which
  205. lets you re-route anything that is
  206. normally displayed on the screen into
  207. the file.
  208.  
  209. For example, try this variation of the
  210. previous macro:
  211.  
  212. B #F/|S|A/
  213. Z
  214. YI YT/Number of words = / .RV
  215.  
  216.  
  217. -- Give command "MN" to continue --
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228. 
  229. Note:    Since the help system fills
  230.     the entire screen you should
  231.     read these instructions before
  232.     typing anything.
  233.  
  234. The "H" command gives help in Command
  235. mode by first displaying several
  236. screens which list all commands.  For
  237. help on a particular command type the
  238. command letter(s) and <Enter>.
  239.  
  240. For example, for help with the "ET"
  241. command which changes the Tab positions,
  242. type "H" and <Enter> and then "ET" and
  243. <Enter>.
  244.  
  245. As an alternative, you can give the
  246. command "HET" (and <Enter>) which skips
  247. the help menu and directly gives help on
  248. the "ET" command.
  249.  
  250. -- Give command "MN" to continue --
  251.  
  252.  
  253. 
  254. The "H" command gives help on any
  255. command.  The "EH" command gives help on
  256. common topics.
  257.  
  258. The on-line help uses three help files
  259. (VVHELP.HLP, VPHELP.HLP and
  260. VPEHELP.HLP).  You can easily change
  261. these files to suit your own purposes.
  262. It is also informative to print these
  263. files;  they contain approximately the
  264. same information as the Quick Reference
  265. section of the manual.
  266.  
  267. (Due to space constraints on the 5-1/4"
  268. demo disk, the file VPEHELP.HLP is not
  269. included and the "EH" command is
  270. therefore inoperative.)
  271.  
  272. -- Give command "MN" to continue --
  273.  
  274.  
  275.  
  276.  
  277.  
  278. 
  279. This demo has barely scratched the
  280. capabilities of the Command Mode.
  281. However, we hope that it has given you a
  282. few hints on how it can be used.
  283.  
  284. If you are the programming type, you may
  285. want to print the on-line help file
  286. VPHELP.HLP which briefly describes each
  287. command.
  288.  
  289. (Due to space constraints on the 5-1/4"
  290. demo disk, the file VPHELP.HLP is not
  291. complete and only describes some of
  292. the commmands. The complete VPHELP.HLP
  293. and VPEHELP.HLP may be downloaded via
  294. our BBS: (313) 996-1304.
  295.  
  296. -- Give command "MN" to continue --
  297.